-- GENERATED SPELL FOR [Cresting Exile] --


function spell0_2761(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_2761', 0, 1)
end

function spell1_2761(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(865,pUnit)
pUnit:RegisterEvent('Sorts_2761', 8000, 1)
end

function Sorts_2761(pUnit, Event)
local choix_sorts_2761 = math.random(0, 1)
if choix_sorts_2761 == 0 then
pUnit:RegisterEvent('spell0_2761', 1, 1)
end
if choix_sorts_2761 == 1 then
pUnit:RegisterEvent('spell1_2761', 1, 1)
end
end

function mob2761_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2761', math.random(1500, 3000), 1)
end

function mob2761_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2761_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2761_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2761, 1, 'mob2761_Action')
RegisterUnitEvent(2761, 2, 'mob2761_Leave')
RegisterUnitEvent(2761, 3, 'mob2761_Kill')
RegisterUnitEvent(2761, 4, 'mob2761_Die')
